package com.boot.springboot.component.qlexpress.domain;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;
import java.util.Objects;

@Slf4j
@Data
public class LogContentReq {

   private String logId;
   private String name;
   private String mac;
   private String activeId;
   private String brand;
   private String model;
   private String chip;
   private String core;
   private String sysVer;
   private long androidVer;
   private long appVer;
   private String appVerName;
   private String appPkg;
   private long sdkVer;
   private String cOpenId;
   private long logTime;
   private long osBootTime;
   private Map<String, Object> data;

   public Integer getAndroidVer() {
      if (Objects.isNull(androidVer)) {
         return 0;
      }
      return Integer.valueOf((String.valueOf(androidVer)));
   }

   public Integer getAppVer() {
      if (Objects.isNull(appVer)) {
         return 0;
      }
      return Integer.valueOf((String.valueOf(appVer)));
   }

   public Integer getSdkVer() {
      if (Objects.isNull(sdkVer)) {
         return 0;
      }
      return Integer.valueOf((String.valueOf(sdkVer)));
   }

   public Integer getOsBootTime() {
      if (Objects.isNull(osBootTime)) {
         return 0;
      }
      return Integer.valueOf((String.valueOf(osBootTime)));
   }
}
